<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<textarea name="" id="" cols="50" rows="20">数据图类型，数组求和，循环语句，运算符，转换时间，定时器函数</textarea>
<br>
<button>已阅读用户协议(60)</button>
<body>
    <script>
        const btn=document.querySelector('button')
        let i=60
        setInterval(function(){
            i--
            btn.innerHTML=`已阅读用户协议(${i})`
            if(i<=0){
                btn.innerHTML='同意'
                btn.disabled=false
            }
        },1000)
        //开启定时器
        // function set(){
        //     document.write('111<br>')
        // }
        // setInterval(set,1000)
        //关闭定时器
        let time=setInterval(function(){document.write('666<br>')},1000)
        clearInterval(time)
        console.log(time)
    </script>
</body>
</html>